/**
 * Created by huangxuehua on 2017/12/6.
 */
$("header>a.goBack").click(function(){
    window.history.go(-1)
});

var xpHome = new Vue({
    el:'#app',
    data:{
        afterSaleGoods:{}// 售后产品信息
    },
    methods: {
        getDate:function(time){   //带中文时间  年月时分
           return nUtils.getDateTimeDetail(time)
        },
        getDateDetail:function(time){ //年月日时分
            return nUtils. dateTime(time)
        },
       initData:function(){
           var afterGoodsInfo=window.localStorage.getItem("afterSaleGoodsInfo");
           if(afterGoodsInfo){
               xpHome.afterSaleGoods=JSON.parse(afterGoodsInfo);
               console.log("---xpHome.afterSaleGoods--",xpHome.afterSaleGoods)
           }
       },
        getAfterSaleType:function(order) {
            var status = "";
            switch (order) {
                case "0":
                    status = "等待处理";
                    break;
                case "1":
                    status = "处理中";
                    break;
                case "2"://
                    status = "等待关闭";
                    break;
                case "3"://
                    status = "已关闭";
                    break;

            }
            return status;
        }
    }
});
$(function(){
    xpHome.initData()
})